package com.yi.service.impl;

import com.yi.dao.UserDao;
import com.yi.model.User;
import com.yi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户类逻辑操作
 * @author YI
 * @date 2018-3-15 16:03:51
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;

    @Override
    public Integer addUser(User user){
        return userDao.insertUser(user);
    }

    @Override
    public List<User> findUser(int id){
        return userDao.getUserByDepartmentId(id);
    }
}
